Benjamin Otte [Sun, 18 Dec 2016 16:52:47 +0000 (17:52 +0100)]
gtk: Remove unused argument from function
Benjamin Otte [Sun, 18 Dec 2016 16:10:45 +0000 (17:10 +0100)]
gsk: Add gsk_rounded_rect_shrink()
... and replace _gtk_rounded_box_grow() and _gtk_rounded_box_shrink()
with it.
Benjamin Otte [Sun, 18 Dec 2016 06:08:37 +0000 (07:08 +0100)]
vulkan: Get rid of color in push constants
The color comes in instance data now, no need to abuse push constants
for it.
Benjamin Otte [Sun, 18 Dec 2016 06:07:02 +0000 (07:07 +0100)]
vulkan: Remove color from push constants
It's now handled by the color pipeline.
Benjamin Otte [Sun, 18 Dec 2016 05:54:48 +0000 (06:54 +0100)]
vulkan: Pass color rects in instance data
This way, we don't need push constants or per-vertex data, we can render
colored rectangles completely via instance data.
Benjamin Otte [Sun, 18 Dec 2016 04:59:56 +0000 (05:59 +0100)]
vulkan: Don't pass texture coordinates to the color pipeline
Benjamin Otte [Sun, 18 Dec 2016 04:33:16 +0000 (05:33 +0100)]
vulkan: Get vertex description from pipeline subclass
Benjamin Otte [Sun, 18 Dec 2016 01:18:01 +0000 (02:18 +0100)]
vulkan: Split color and blend pipelines
Benjamin Otte [Sun, 18 Dec 2016 00:45:07 +0000 (01:45 +0100)]
vulkan: Move vertex data tracking to the pipeline subclass
That way, different pipelines can draw different kinds of data.
Benjamin Otte [Sat, 17 Dec 2016 23:57:37 +0000 (00:57 +0100)]
vulkan: Add GskVulkanBlendPipeline
So far that's just a simple pipeline that doesn't do anything.
Benjamin Otte [Sat, 17 Dec 2016 23:33:53 +0000 (00:33 +0100)]
vulkan: Make GskVulkanPipeline derivable
Benjamin Otte [Sat, 17 Dec 2016 19:46:25 +0000 (20:46 +0100)]
menu: Implement snapshot() for the menu code
Benjamin Otte [Sat, 17 Dec 2016 19:29:41 +0000 (20:29 +0100)]
paned: Implement snapshot()
Benjamin Otte [Sat, 17 Dec 2016 07:07:29 +0000 (08:07 +0100)]
cssimage: Implement snapshot() for cross-fade
Benjamin Otte [Sat, 17 Dec 2016 07:06:59 +0000 (08:06 +0100)]
snapshot: Implement gtk_snapshot_push_opacity()
Use it in GtkWidget's opacity handling.
Benjamin Otte [Sat, 17 Dec 2016 07:03:43 +0000 (08:03 +0100)]
snapshot: Handle NULL returns in pop_and_append()
Benjamin Otte [Sat, 17 Dec 2016 06:44:10 +0000 (07:44 +0100)]
gsk: Add cross-fade node
And implement stack crossfades with it.
Benjamin Otte [Sat, 17 Dec 2016 03:54:19 +0000 (04:54 +0100)]
vulkan: Batch upload image barriers together
Doesn't seem to help much though...
Benjamin Otte [Sat, 17 Dec 2016 03:22:44 +0000 (04:22 +0100)]
vulkan: Add GskVulkanUploader
It's the thing that makes sure pixels end up on the GPU.
Benjamin Otte [Fri, 16 Dec 2016 05:10:24 +0000 (06:10 +0100)]
vulkan: Split out command pool
This way we can pass the command pool around.
And that allows us to allocate and submitcustom buffers.
And that is necessary to make staging images work.
Benjamin Otte [Thu, 15 Dec 2016 23:22:23 +0000 (00:22 +0100)]
vulkan: Implement staging-buffer image upload
This is not enabled by default. Use GSK_RENDERING_MODE=staging-buffer to
use the code.
Benjamin Otte [Thu, 15 Dec 2016 09:09:41 +0000 (10:09 +0100)]
snapshot: Convert Range, Scale, ColorScale
And of course Scrollbar, but that one does no drawing itself.
Benjamin Otte [Thu, 15 Dec 2016 09:08:46 +0000 (10:08 +0100)]
gsk: Check for NULL in calls to gsk_cairo_node_get_surface()
That function does actually sometimes return NULL and is documented to
do so, so handle that case in the renderers (by omitting the node).
Benjamin Otte [Thu, 15 Dec 2016 04:42:31 +0000 (05:42 +0100)]
gsk: Implement linear gradient render nodes
Benjamin Otte [Thu, 15 Dec 2016 03:24:37 +0000 (04:24 +0100)]
gsk: Add blend nodes
Implement blend mode support in GTK background compositing with it.
Benjamin Otte [Thu, 15 Dec 2016 03:20:35 +0000 (04:20 +0100)]
css: Replace custom blend modes with GskBlendMode
Benjamin Otte [Thu, 15 Dec 2016 03:19:03 +0000 (04:19 +0100)]
gsk: Add missing blend modes
This brings GSK blend modes in line with the CSS spec.
Benjamin Otte [Wed, 14 Dec 2016 08:40:15 +0000 (09:40 +0100)]
vulkan: Add infrastructure for multiple pipelines
And use it to draw solid colors with a 2nd pipeline.
Benjamin Otte [Wed, 14 Dec 2016 07:00:58 +0000 (08:00 +0100)]
vulkan: Split PipelineLayout into its own object
This way, we can share the layout between different pipelines.
Benjamin Otte [Wed, 14 Dec 2016 06:34:18 +0000 (07:34 +0100)]
vulkan: Split render ops into seperate structs
This makes it a lot clearer which members are relevant for each
different operation.
Benjamin Otte [Wed, 14 Dec 2016 06:21:21 +0000 (07:21 +0100)]
vulkan: Add infrastructure for push constants
THe code includes fragment push constants for colors, but that code is
so far unused.
Benjamin Otte [Wed, 14 Dec 2016 03:55:24 +0000 (04:55 +0100)]
cssimage: Port a few more simple ones to snapshots
Benjamin Otte [Tue, 13 Dec 2016 23:08:29 +0000 (00:08 +0100)]
render: Fall back later when rendering backgrounds
We can now render most backgrounds fine.
Benjamin Otte [Tue, 13 Dec 2016 23:06:01 +0000 (00:06 +0100)]
gtk: Fix memleaks
It turns out, some simple getters - such as
gdk_drawing_context_get_clip() - love copying things before returning
them.
I guess somebody has to burn cycles...
Benjamin Otte [Tue, 13 Dec 2016 22:00:26 +0000 (23:00 +0100)]
css: An opaque background does not allow omitting push_group
When the background-clip of the background is smaller than the
background-clip of blended images, not pushing a group is wrong.
Test testing exactly that included.
Benjamin Otte [Tue, 13 Dec 2016 20:59:28 +0000 (21:59 +0100)]
gsk: Add support for rounded clip rectangles
Also add support to GtkSnapshot, so people can push rounded clips.
Benjamin Otte [Tue, 13 Dec 2016 20:00:28 +0000 (21:00 +0100)]
roundedbox: Remove _gtk_rounded_box_path()
Use gsk_rounded_rect_path() instead.
That's a private GSK function, be we can just include its header.
Benjamin Otte [Tue, 13 Dec 2016 19:51:57 +0000 (20:51 +0100)]
roundedbox: Remove _gtk_rounded_box_move()
Use gsk_rounded_rect_offset() instead.
Benjamin Otte [Tue, 13 Dec 2016 19:48:58 +0000 (20:48 +0100)]
gtk: Remove GtkRoundedBox struct
Use GskRoundedRect instead.
Benjamin Otte [Tue, 13 Dec 2016 19:36:00 +0000 (20:36 +0100)]
roundedbox: typedef to GskRoundedRect
Benjamin Otte [Tue, 13 Dec 2016 19:15:01 +0000 (20:15 +0100)]
roundedbox: Use a graphene_size_t for the corners
Obviously, I'm trying to port GtkRoundedBox to GskRoundedRect.
This is the second step on that path.
Benjamin Otte [Tue, 13 Dec 2016 18:54:40 +0000 (19:54 +0100)]
gtk: Get rid of GtkCssCorner
We have GskCorner now which is identical.
Benjamin Otte [Tue, 13 Dec 2016 18:02:12 +0000 (19:02 +0100)]
gsk: Add GskRoundedRect
It's essentially a port of GtkRoundedBox to graphene.
Benjamin Otte [Tue, 13 Dec 2016 15:19:14 +0000 (16:19 +0100)]
viewport: implement snapshot()
Benjamin Otte [Tue, 13 Dec 2016 08:45:09 +0000 (09:45 +0100)]
stack: Implement snapshot()
This uses the new push()/pop() mechanism to its fullest extent when
implementing transitions. It's fun to inspect the results in the
inspector.
Crossfades don't work yet, they continue using a Cairo fallback.
A side effect of the stack conversion is that widget-factory now uses
snapshots for a lot more things.
Benjamin Otte [Tue, 13 Dec 2016 08:40:24 +0000 (09:40 +0100)]
snapshot: Work on pushing and popping again
It is now possible to call push() subfunctions for simple container
nodes with just a single child. So you can for example
gtk_snapshot_push_clip() a clip region that all the nodes that get
appended later will then obey.
gtk_snapshot_pop() will then not return a container node, but a clip
node containing the container node (and similar for the transform
example).
This is implemented internally by providing a "collect function" when
pushing that is called when popping to collects all the accumulated
nodes and combine them into the single node that gets returned.
To simplify things even more, gtk_snapshot_pop_and_append() has been
added, which pops the currently pushed node and appends it to the
parent.
The icon rendering code has been converted to this approach.
Benjamin Otte [Tue, 13 Dec 2016 08:37:51 +0000 (09:37 +0100)]
gsk: Add gsk_clip_node_new()
The node is a simple clipping node: It does a rectangular clip of its
contents.
Benjamin Otte [Tue, 13 Dec 2016 04:55:42 +0000 (05:55 +0100)]
stack: Don't draw an extra background
The gadget draws a background for us, we don't need another one.
Benjamin Otte [Tue, 13 Dec 2016 04:49:57 +0000 (05:49 +0100)]
gsk: Replace gsk_render_node_set_opacity()
... with gsk_opacity_node_new().
Also implement support for opacity in gtk_widget_snapshot() using this
new node.
Benjamin Otte [Tue, 13 Dec 2016 04:12:41 +0000 (05:12 +0100)]
cssimage: Implement snapshot() in the fallback image
Benjamin Otte [Tue, 13 Dec 2016 04:11:59 +0000 (05:11 +0100)]
cssimage: Use textures in GtkCssImageSurface
We now use textures instead of surfaces and implement the snapshot()
vfunc instead of draw().
Benjamin Otte [Tue, 13 Dec 2016 04:10:05 +0000 (05:10 +0100)]
cssimage: Implement a fallback draw() vfunc
... that chains into snapshot. This way, we can stop implementing draw()
in GtkCssImage subclasses and focus on snapshot() instead.
Benjamin Otte [Tue, 13 Dec 2016 04:08:40 +0000 (05:08 +0100)]
snapshot: Make gtk_snapshot_get_renderer() private
Public API doesn't need to be concerned with renderers. Worst case, they
can use NULL instead of the actual renderer.
Benjamin Otte [Tue, 13 Dec 2016 04:07:43 +0000 (05:07 +0100)]
gsk: Remove gsk_renderer_create_fallback()
Use gsk_render_node_draw() instead.
Benjamin Otte [Tue, 13 Dec 2016 03:22:13 +0000 (04:22 +0100)]
snapshot: Add API for colors and textures
Benjamin Otte [Tue, 13 Dec 2016 03:20:04 +0000 (04:20 +0100)]
gsk: Add fallback code to renderers
This code makes renderers fall back to Cairo rendering if they don't
know how to handle a render node's type.
This allows adding new render nodes with impunity.
Benjamin Otte [Tue, 13 Dec 2016 02:35:56 +0000 (03:35 +0100)]
gsk: Add gsk_color_node_new()
Benjamin Otte [Tue, 13 Dec 2016 02:15:07 +0000 (03:15 +0100)]
Call gsk_render_node_draw() instead of creating fallback renderers
Benjamin Otte [Tue, 13 Dec 2016 02:05:15 +0000 (03:05 +0100)]
gsk: Add gsk_render_node_draw()
Draws a node to a given cairo_t. This is mostly intended for fallback
usage.
Benjamin Otte [Tue, 13 Dec 2016 01:33:15 +0000 (02:33 +0100)]
snapshot: Change how gtk_snapshot_push/pop works
Instead of appending a container node and adding the nodes to it as they
come in, we now collect the nodes until gtk_snapshot_pop() is called and
then hand them out in a container node.
The caller of gtk_snapshot_push() is then responsible for doing whatever
he wants with the created node.
Another addigion is the keep_coordinates flag to gtk_snapshot_push()
which allows callers to keep the current offset and clip region or
discard it. Discarding is useful when doing transforms, keeping it is
useful when inserting effect nodes (like the ones I'm about to add).
Benjamin Otte [Tue, 13 Dec 2016 00:44:52 +0000 (01:44 +0100)]
snapshot: Handle clip region as part of the state
This is in preparation for further changes.
Benjamin Otte [Mon, 12 Dec 2016 23:11:06 +0000 (00:11 +0100)]
gsk: gsk_render_node_set_transform() => GskTransformNode
Instead of having a setter for the transform, have a GskTransformNode.
Most of the oprations that GTK does do not require a transform, so it
doesn't make sense to have it as a primary attribute.
Also, changing the transform requires updating the uniforms of the GL
renderer, so we're happy if we can avoid that.
Benjamin Otte [Mon, 12 Dec 2016 18:30:41 +0000 (19:30 +0100)]
gsK: Move children handling to GskContainerNode
Benjamin Otte [Mon, 12 Dec 2016 17:54:49 +0000 (18:54 +0100)]
gsk: Remove GskRenderNode::parent
... and all related APIs.
Benjamin Otte [Mon, 12 Dec 2016 17:53:41 +0000 (18:53 +0100)]
inspector: Prepare TreeModelRenderNode for brave new world
I'm about to move children handling to the container node, which means
the generic code can no longer assume children APIs existing.
So rewrite the treemodel to work without it.
Benjamin Otte [Mon, 12 Dec 2016 15:52:55 +0000 (16:52 +0100)]
gsk: Remove world matrix support
Use the real transform and compute it manually.
Benjamin Otte [Mon, 12 Dec 2016 05:29:04 +0000 (06:29 +0100)]
gsk: Remove gsk_render_node_set_bounds()
gsk_render_node_get_bounds() still exists and is computed via vfunc
call:
- containers dynamically compute the bounds from their children
- surface and texture nodes get bounds passed on construction
Benjamin Otte [Sun, 11 Dec 2016 10:55:10 +0000 (11:55 +0100)]
gsk: Remove gsk_render_node_get_size()
In the brave new world of refactored render nodes, this function doesn't
really make any sense anymore. We could turn it into a vfunc, but I
don't think it's useful.
Especially because even in the brave old world, this function was
causing a vastl overallocation of nodes when the GL renderer needed render
targets.
Benjamin Otte [Sun, 11 Dec 2016 10:53:17 +0000 (11:53 +0100)]
gsk: Add GskRenderNodeClass.make_immutable()
Benjamin Otte [Sun, 11 Dec 2016 10:48:32 +0000 (11:48 +0100)]
gsk: Remove gsk_render_node_set_opaque()
If we ever feel, we need this function again, we can readd it later.
But nobody is using it other than for overriding opactiy. And you can
just override opacity directly if you care.
Benjamin Otte [Sun, 11 Dec 2016 03:28:21 +0000 (04:28 +0100)]
gsk: Add custom structs to RenderNode subclasses
So now we don't need to keep a texture pointer and a surface pointer and
so on in the base struct.
Benjamin Otte [Sun, 11 Dec 2016 03:18:25 +0000 (04:18 +0100)]
gsk: Add GskRenderNodeClass.finalize()
Benjamin Otte [Sun, 11 Dec 2016 03:14:04 +0000 (04:14 +0100)]
gsk: Add gsk_container_node_new()
It replaces gsk_renderer_create_render_node() which was doing the eact
same thing, only taking an unused extra argument.
Benjamin Otte [Sun, 11 Dec 2016 03:13:22 +0000 (04:13 +0100)]
gtk: Remove gtk_snapshot_append()
It does not make sense to append an empty container node. Those should
only be push()'d.
Benjamin Otte [Sun, 11 Dec 2016 02:57:42 +0000 (03:57 +0100)]
gsk: Introduce GskRenderNodeClass
This is modeled after GtkCssValueClass. So far it doesn't do anything.
Benjamin Otte [Sun, 11 Dec 2016 01:59:47 +0000 (02:59 +0100)]
gsk: Split render node subclasses out into their own file
Benjamin Otte [Sun, 11 Dec 2016 01:33:58 +0000 (02:33 +0100)]
gsk: Remove gsk_render_node_is_surface/texture()
Use gsk_render_node_get_node_type() instead.
Benjamin Otte [Sun, 11 Dec 2016 00:51:35 +0000 (01:51 +0100)]
gsk: Remove unneeded children modifiers
Creating render nodes is fire-and-forget, so all one should do is create
a container, append, append, append and then send it off to the
renderer. So there's no need to replace, insert between or anything
else.
Benjamin Otte [Sun, 11 Dec 2016 00:23:02 +0000 (01:23 +0100)]
gsk: Add gsk_cairo_node_new()
Split off Cairo drawn content nodes and require you to allocate them
using this new function.
Benjamin Otte [Sat, 10 Dec 2016 23:12:02 +0000 (00:12 +0100)]
gtk: Don't push cairo nodes
We want to split nodes into containers and nodes that do actual drawing.
So pushing nodes that do drawing is exactly the wrong thing.
Also fix up GtkPopover. There's no need for it to push anything.
Benjamin Otte [Sat, 10 Dec 2016 21:52:22 +0000 (22:52 +0100)]
gsk: Add gsk_texture_node_new()
Start the transition into the different node types.
Benjamin Otte [Sat, 10 Dec 2016 20:42:01 +0000 (21:42 +0100)]
gsk: Add GskRenderNodeType
For now, this is unused.
Benjamin Otte [Sat, 10 Dec 2016 15:59:34 +0000 (16:59 +0100)]
gsk: Remove GskRenderNodeIter
Benjamin Otte [Sat, 10 Dec 2016 14:33:16 +0000 (15:33 +0100)]
gsk: Make GskRenderNode a boxed type
Benjamin Otte [Sat, 10 Dec 2016 14:21:28 +0000 (15:21 +0100)]
gsk: Remove custom GValue API for GskRenderNode
Benjamin Otte [Fri, 9 Dec 2016 23:18:03 +0000 (00:18 +0100)]
gsk: Remove GskRenderNode::hidden
If you want to hide something, don't render it.
Benjamin Otte [Fri, 9 Dec 2016 23:01:29 +0000 (00:01 +0100)]
gsk: Remove RenderNode::anchor-point
Balázs Meskó [Tue, 20 Dec 2016 15:14:01 +0000 (15:14 +0000)]
Update Hungarian translation
Balázs Meskó [Tue, 20 Dec 2016 15:13:33 +0000 (15:13 +0000)]
Update Hungarian translation
Daniel Mustieles [Tue, 20 Dec 2016 11:32:30 +0000 (11:32 +0000)]
Update Spanish translation
Daniel Mustieles [Tue, 20 Dec 2016 11:31:59 +0000 (11:31 +0000)]
Update Spanish translation
Chun-wei Fan [Tue, 20 Dec 2016 06:39:39 +0000 (14:39 +0800)]
build/Makefile.msvcproj: Fix cleanup
When we generate the Visual Studio 2013 projects, we need to remove the
*.vs12.sourcefiles and *.vs12.sourcefile.filters that are generated during
the process, so that 'make distcheck' won't complain about leftover files.
Debarshi Ray [Fri, 16 Dec 2016 23:30:39 +0000 (00:30 +0100)]
flowbox: Export gtk_flow_box_get_child_at_pos as public API
https://bugzilla.gnome.org/show_bug.cgi?id=776187
Debarshi Ray [Mon, 12 Dec 2016 20:04:05 +0000 (21:04 +0100)]
GtkStack: Remove redundant code
Commit
7ce96cb6ac28eeb62e003dcb9e0a8ce7d48e09e0 avoids notifications
during destruction by using gtk_widget_in_destruction. Therefore this
code is no longer needed.
This reverts commit
39e7afecb1ee882232e887e1b3e4c30ae0afe3a3
https://bugzilla.gnome.org/show_bug.cgi?id=749012
Philip Chimento [Thu, 15 Dec 2016 22:09:49 +0000 (14:09 -0800)]
GtkApplication: Lack of optional components shouldn't warn
When running uninstalled tests with GtkApplication on an autobuilder with
a fake session bus, warnings will cause the tests to abort. The GNOME
session manager, the Xfce session manager, and the Inhibit portal are all
not needed for normal operation of GTK, so we should not log warnings if
they are not found.
As well as not being present on a fake session bus, it's also not
expected that they'll be present on all platforms.
https://bugzilla.gnome.org/show_bug.cgi?id=774784
Piotr Drąg [Mon, 3 Oct 2016 16:20:03 +0000 (18:20 +0200)]
Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772371
Debarshi Ray [Mon, 12 Dec 2016 20:12:51 +0000 (21:12 +0100)]
flowbox: Don't emit selected-children-changed during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
Debarshi Ray [Sun, 18 Dec 2016 08:43:38 +0000 (09:43 +0100)]
listbox: Don't emit selected-rows-changed, etc. during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
Debarshi Ray [Fri, 16 Dec 2016 22:40:21 +0000 (23:40 +0100)]
flowbox: Rename gtk_flow_box_find_child_at_pos for consistency
... with gtk_list_box_get_row_at_y. It would be nice to avoid the
'find' versus 'get' discrepancy since we are planning to expose it as
public API.
https://bugzilla.gnome.org/show_bug.cgi?id=776187
Chun-wei Fan [Mon, 19 Dec 2016 09:09:49 +0000 (17:09 +0800)]
GDK/Win32: Fix Windows backend after GdkWindow simplification
Fix the build after the branch wip/alexl/simplify-gdkwindow was merged, as
there are some changes that broke things in the Windows backend, namely:
-gdk_win32_input_shape_combine_region() should not be removed at this
point (though it is a stub--otherwise GDK/Win32 will crash)
-Some more code need to be removed due to the removal of items in the
above-mentioned merged branch
Also, like the X11 backend, do not allow the creation of native child
windows, and stop checking for subsequent child windows
(GDK_WINDOW_CHILD), so that we can clean things up a bit.
https://bugzilla.gnome.org/show_bug.cgi?id=773299